﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Helpers ;
using DataAccess;
using Business;
using DTO;

namespace Football_Manager
{
    public partial class frmMain : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        //Biến Global
        public static ParameterDTO SYSTEM_PARAMETERS;

        public frmMain()
        {
            InitializeComponent();
            MapperCreator.CreateMapper();
            SkinHelper.InitSkinPopupMenu(biSkin );
            GetParameters();
        }

        void GetParameters()
        {
            SYSTEM_PARAMETERS = ParameterBUS.GetParameter();
        }

        private void btiLogin_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmLogin frm = new frmLogin();
            frm.ShowDialog();
        }

        private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmLogin frm = new frmLogin();
            frm.MdiParent = this;
            frm.Show();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            frmHomePage frm = new frmHomePage();
            frm.MdiParent = this;
            frm.Show();            
        }

        private void btnRegister_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmTeamRegistration  frm = new frmTeamRegistration();
            frm.MdiParent = this;
            frm.Show();
        }

        private void btnManageGround_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmManageGround frm = new frmManageGround();
            frm.MdiParent = this;
            frm.Show();
        }

        private void btnParamenter_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmManageParameters frm = new frmManageParameters();
            frm.ShowDialog();
        }

        private void btnCreateMatches_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmCreateMatches frm = new frmCreateMatches();
            frm.MdiParent = this;
            frm.Show();
        }

      
       
    }
}